package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserMapper {

    // JPA   Hibernate   MyBatis    MyBatisPlus
    //@Select("select * from xxx")
    SysUser selectSysUserByUsername(String userName); //@Param("userName")

    List<SysUser> findByPage(@Param("sysUserDto") SysUserDto sysUserDto);

    void insert(SysUser sysUser);

    SysUser getById(Long id);

    void update(SysUser sysUser);

    void deleteById(Long id);
}
